// vite.config.ts
import { loadEnv } from "file:///D:/Project/vue-project/vue3-admin-template/vue3-project/node_modules/.pnpm/vite@5.2.11_@types+node@20.12.12_less@4.2.0/node_modules/vite/dist/node/index.js";
import { fileURLToPath, URL } from "node:url";
import { createSvgIconsPlugin } from "file:///D:/Project/vue-project/vue3-admin-template/vue3-project/node_modules/.pnpm/vite-plugin-svg-icons@2.0.1_vite@5.2.11_@types+node@20.12.12_less@4.2.0_/node_modules/vite-plugin-svg-icons/dist/index.mjs";
import path from "path";
import vue from "file:///D:/Project/vue-project/vue3-admin-template/vue3-project/node_modules/.pnpm/@vitejs+plugin-vue@5.0.4_vite@5.2.11_@types+node@20.12.12_less@4.2.0__vue@3.4.27_typescript@5.4.5_/node_modules/@vitejs/plugin-vue/dist/index.mjs";
import { viteMockServe } from "file:///D:/Project/vue-project/vue3-admin-template/vue3-project/node_modules/.pnpm/vite-plugin-mock@2.9.6_mockjs@1.1.0_rollup@4.17.2_vite@5.2.11_@types+node@20.12.12_less@4.2.0_/node_modules/vite-plugin-mock/dist/index.js";
import VueSetupExtend from "file:///D:/Project/vue-project/vue3-admin-template/vue3-project/node_modules/.pnpm/vite-plugin-vue-setup-extend@0.4.0_vite@5.2.11_@types+node@20.12.12_less@4.2.0_/node_modules/vite-plugin-vue-setup-extend/dist/index.mjs";
var __vite_injected_original_import_meta_url = "file:///D:/Project/vue-project/vue3-admin-template/vue3-project/vite.config.ts";
var vite_config_default = ({ command, mode }) => {
  let env = loadEnv(mode, process.cwd());
  return {
    plugins: [
      vue(),
      createSvgIconsPlugin({
        iconDirs: [path.resolve(process.cwd(), "src/assets/icons")],
        symbolId: "icon-[dir]-[name]"
      }),
      viteMockServe({
        localEnabled: command === "serve"
      }),
      VueSetupExtend()
    ],
    resolve: {
      alias: {
        "@": fileURLToPath(new URL("./src", __vite_injected_original_import_meta_url))
      }
    },
    // less 全局变量配置
    css: {
      preprocessorOptions: {
        less: {
          javascriptEnabled: true,
          additionalData: '@import "./src/styles/variable.less";'
        }
      }
    },
    server: {
      proxy: {
        [env.VITE_APP_BASE_API]: {
          // 获取数据的服务器地址设置
          target: env.VITE_SERVE,
          // 是否需要代理跨域
          changeOrigin: true,
          // 路径重写
          rewrite: (path2) => path2.replace(/^\/api/, "")
        }
      }
    }
  };
};
export {
  vite_config_default as default
};
//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsidml0ZS5jb25maWcudHMiXSwKICAic291cmNlc0NvbnRlbnQiOiBbImNvbnN0IF9fdml0ZV9pbmplY3RlZF9vcmlnaW5hbF9kaXJuYW1lID0gXCJEOlxcXFxQcm9qZWN0XFxcXHZ1ZS1wcm9qZWN0XFxcXHZ1ZTMtYWRtaW4tdGVtcGxhdGVcXFxcdnVlMy1wcm9qZWN0XCI7Y29uc3QgX192aXRlX2luamVjdGVkX29yaWdpbmFsX2ZpbGVuYW1lID0gXCJEOlxcXFxQcm9qZWN0XFxcXHZ1ZS1wcm9qZWN0XFxcXHZ1ZTMtYWRtaW4tdGVtcGxhdGVcXFxcdnVlMy1wcm9qZWN0XFxcXHZpdGUuY29uZmlnLnRzXCI7Y29uc3QgX192aXRlX2luamVjdGVkX29yaWdpbmFsX2ltcG9ydF9tZXRhX3VybCA9IFwiZmlsZTovLy9EOi9Qcm9qZWN0L3Z1ZS1wcm9qZWN0L3Z1ZTMtYWRtaW4tdGVtcGxhdGUvdnVlMy1wcm9qZWN0L3ZpdGUuY29uZmlnLnRzXCI7aW1wb3J0IHsgVXNlckNvbmZpZ0V4cG9ydCwgQ29uZmlnRW52LCBsb2FkRW52IH0gZnJvbSAndml0ZSdcbmltcG9ydCB7IGZpbGVVUkxUb1BhdGgsIFVSTCB9IGZyb20gJ25vZGU6dXJsJ1xuaW1wb3J0IHsgY3JlYXRlU3ZnSWNvbnNQbHVnaW4gfSBmcm9tICd2aXRlLXBsdWdpbi1zdmctaWNvbnMnXG5pbXBvcnQgcGF0aCBmcm9tICdwYXRoJ1xuaW1w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